package com.twu.biblioteca;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: ysotirov
 * Date: 30/01/13
 * Time: 18:49
 * To change this template use File | Settings | File Templates.
 */
public class MembersMenu extends Menu {

    ArrayList<IMenu> membersMenuOptions;

    public MembersMenu(IOInterface ioHndl, Biblioteca bibl) {
        super(ioHndl,bibl);
        titleMsg = "Members Menu";
        OptionList.add("1. View membership details");
        OptionList.add("2. Go back to main menu");
        selectOptionMsg = "Please select one of the above options";

        membersMenuOptions = new ArrayList<IMenu>();
        membersMenuOptions.add(new DisplayMembershipDetails(ioHndl,bibl));
        membersMenuOptions.add(new GoBackToMain(ioHndl,bibl));



    }

    @Override
    public void executeOption(int opt) {
        membersMenuOptions.get(opt-1).executeOption();

    }
}
